package com.example.demo1.controller;

import com.example.demo1.mapper.MessageInfoMapper;
import com.example.demo1.model.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-20
 * Time: 15:03
 */
@Service
public class MessageService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;

    public List<Message> queryMessage() {
        return messageInfoMapper.queryMessage();
    }

    public void insertMessage(Message message) {
        messageInfoMapper.insertMessage(message);
    }
}
